/**
 *
 */
package com.school.fuyuan.framework.config.param;

import lombok.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.io.Serializable;

/**
 * @author zrhong
 * @date 2019-03-03
 * @version 1.0
 * @description
 */
@Configuration("dataSourcePropertiesData")
@PropertySource("${db.path}")
@Setter
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class DataSourcePropertiesData implements Serializable {

	private static final long serialVersionUID = 3222130142959674641L;

	@Value("${spring.datasource.driverClassName}")
	protected String driverClassName;

	@Value("${spring.datasource.url}")
	protected String url;

	@Value("${spring.datasource.username}")
	protected String userName;

	@Value("${spring.datasource.password}")
	protected String password;

	@Value("${spring.druid.initialSize}")
	protected int initialSize;

	@Value("${spring.druid.minIdle}")
	protected int minIdle;

	@Value("${spring.druid.maxActive}")
	protected int maxActive;

	@Value("${spring.druid.maxWait}")
	protected long maxWait;

	@Value("${spring.druid.timeBetweenEvictionRunsMillis}")
	protected long timeBetweenEvictionRunsMillis;

	@Value("${spring.druid.minEvictableIdleTimeMillis}")
	protected long minEvictableIdleTimeMillis;

	@Value("${spring.druid.validationQuery}")
	protected String validationQuery;

	@Value("${spring.druid.testWhileIdle}")
	protected boolean testWhileIdle;

	@Value("${spring.druid.testOnBorrow}")
	protected boolean testOnBorrow;

	@Value("${spring.druid.testOnReturn}")
	protected boolean testOnReturn;

	@Value("${spring.druid.poolPreparedStatements}")
	protected boolean poolPreparedStatements;

	@Value("${spring.druid.maxPoolPreparedStatementPerConnectionSize}")
	protected int maxPoolPreparedStatementPerConnectionSize;

	@Value("${spring.druid.filters}")
	protected String filters;

	@Value("${spring.druid.connectionProperties}")
	protected String connectionProperties;

}
